﻿Imports Negocio
Imports Entidades
Public Class FormHorario

    Dim ingreso As Negocio.NHorarios
    Dim horario As Entidades.Horarios
    Private Sub agregar_Click(sender As System.Object, e As System.EventArgs) Handles agregar.Click

        horario.phoraini = thorainicial.Text
        horario.phorafin = thorafinal.Text
        horario.phora = thora.Text
        If ingreso.agregahorario(horario) Then
            MsgBox(horario.phoraini)
        Else
            MsgBox("todo mal")
        End If

    End Sub

    Private Sub FormHorario_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        horario = New Entidades.Horarios()
        ingreso = New Negocio.NHorarios()
        Dim ds As DataSet
        ds = ingreso.consultahorarios
        'ListBox1.ValueMember = id
        'ListBox1.DisplayMember = horaini

        ListBox1.DataSource = ds.Tables(0)

    End Sub
End Class